﻿// HSS.ServiceModel.VirtualChannelDelegates.cs
// ----------------------------------------------------------------------------
// Licensed under the MIT license
// http://www.opensource.org/licenses/mit-license.html
// ----------------------------------------------------------------------------
// HighSpeed-Solutions, LLC
// Copyright (c) 2001-2010
// ----------------------------------------------------------------------------
// File:       VirtualChannelDelegates.cs
// Author:     HSS\gbanta
// Created:    08/12/2010
// Modified:   12/04/2010
// ----------------------------------------------------------------------------
namespace HSS.ServiceModel
{
	#region Delegates
	/// <summary>
	/// A delegate that will be called when your call to InvokeAsync completes.
	/// </summary>
	/// <param name="error">null unless an error was encountered.</param>
	public delegate void ChannelActionCompleted(System.Exception error);
	/// <summary>
	/// A delegate that will be called when your call to InvokeAsync completes.
	/// </summary>
	/// <typeparam name="TState">The Type of the user state passed thru the call to InvokeAsync.</typeparam>
	/// <param name="error">null unless an error was encountered.</param>
	/// <param name="userState">The user state passed thru the call to InvokeAsync.</param>
	public delegate void ChannelActionCompleted<TState>(System.Exception error, TState userState);
	/// <summary>
	/// A delegate that will be called when your call to InvokeAsync completes.
	/// </summary>
	/// <typeparam name="TResult">The Type of the result expected from the call to InvokeAsync.</typeparam>
	/// <param name="result">The resulting object from your call to InvokeAsync.</param>
	/// <param name="error">null unless an error was encountered.</param>
	public delegate void ChannelFuncCompleted<TResult>(TResult result, System.Exception error);
	/// <summary>
	/// A delegate that will be called when your call to InvokeAsync completes.
	/// </summary>
	/// <typeparam name="TResult">The Type of the result expected from the call to InvokeAsync.</typeparam>
	/// <typeparam name="TState">The Type of the user state passed thru the call to InvokeAsync.</typeparam>
	/// <param name="result">The resulting object from your call to InvokeAsync.</param>
	/// <param name="error">null unless an error was encountered.</param>
	/// <param name="userState">The user state passed thru the call to InvokeAsync.</param>
	public delegate void ChannelFuncCompleted<TResult, TState>(TResult result, System.Exception error, TState userState);
	#endregion
}